
<?php include_once 'head.php'; ?>

<div class="text">
    <button onclick="window.location.href = '<?php echo $SiteUrl . '/index.php/write'; ?>'" class="button black">我也要写表白</button>
    <button
        <?php if ($page_p > 0): ?>onclick="window.location.href = '<?php echo $SiteUrl . '/index.php/page/' . $page_p; ?>'"<?php endif; ?>
        class="page">
        上一页</button>
    <button class="page">
        第<?= $page ?>/<?= $page_max ?>页</button>
    <button
        <?php if ($page_n <= $page_max): ?>onclick="window.location.href = '<?php echo $SiteUrl . '/index.php/page/' . $page_n; ?>'"<?php endif; ?>
        class="page">
        下一页</button>

    <input type="number" id="page_goto_num">
    <button class="page goto" onclick="goto_page()">跳转到...</button>
    <div class="box">
        <b>02^华:</b>

        <p>欢迎来到表白墙，在这里你所发送的消息通通是匿名的！ 如果有疑问，请发送邮件到<a
                href=mailto:xdyz-bbq@outlook.com?subject=表白墙反馈>xdyz-bbq@outlook.com</a>有什么想写给Ta但是又不好意思直说的，这里可以满足你的要求！
        </p>
    </div>

    <!-- Msg-->
    <?php foreach ($ano as $single): ?>
        <div class="box">
            <a href="<?php echo $SiteUrl . '/index.php/pid/' . $page . '/' . $single['id']; ?>"><?= $single['nick'] ?>:</a>
            <br/>

            <p>
                <?= $single['txt'] ?>
            </p>
            <span id="ttime"><?= date("Y-m-d h:i:s a", $single['time']) ?> </span>
            <span id="fid"><?= $single['id'] ?> 楼</span>
            <br/>
            <a href="<?php echo $SiteUrl . '/index.php/pid/' . $page . '/' . $single['id']; ?>" class="comment_num">评论(<?= $comment_num[$single['id']] ?>
                )</a>
        </div>
    <?php endforeach; ?><!--End Msg-->
</div>

<script language="JavaScript">

    function goto_page() {
        var page_id = document.getElementById("page_goto_num").value;

        if (page_id != "" || page_id != NULL) {
            var goto_url = "<?= $SiteUrl ?>" + "/index.php/page/" + page_id;
            window.location.href = goto_url;
        }
    }
</script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="<?= $viewUrl ?>/js/jquery-2.1.4.min.js"</script>

<?php include_once 'foot.php';
